-- msg_taken_backup_bonus
-- Create by huanghr
-- 领取备用奖励记录

return function(lpc)
    local buffer = Buffer.create(lpc.taken_backup_bonus);

    local offset = 1;
    local id = 0;
    local size = Buffer.size(buffer);

    -- 世界树果实领取备用奖励记录
    local takenBackupBonus = {};

    while (offset <= size) do
        -- 领取的备用奖励记录
        local state = Buffer.getu8(buffer, offset);

        if TalentFruitBonusM.query(id) then
            takenBackupBonus[id] = { ["state"] = state, }
        end

        -- 领取的备用奖励记录
        id = id + 1;
        offset = offset + 1;
    end

    ME.user.dbase:set("taken_backup_bonus", takenBackupBonus);
end